<?php
namespace Model;

use Model\Factory\TableGatewayFactory;

class BlockInstance extends AbstractModel
{
    public $id;
    public $block_class_id;
    public $wrap_class;
    public $wrap_style;
    public $name;
    public $params;
    public $created_date;
    public $created_by;
    public $active;


    /**
     * @return BlockClass
     */
    public function getBlockClass(){
        $blockClassTable = TableGatewayFactory::getBlockClassTable();
        return  $blockClassTable->getBlockClass($this->block_class_id);
    }

    public function getAllRefPage(){
//        return  $this->getRow()->findManyToManyRowset("Page_Resource","PageBlock_Resource");
    }
    public function getAllRefTemplate(){
//        return $this->getRow()->findManyToManyRowset("Template_Resource","TemplateBlock_Resource");
    }
}